package frame

import "fmt"
import "gopkg.in/redis.v5"

type Model struct {

}

// 创建 redis 客户端
func (m *Model)CreateClient() *redis.Client {
	client := redis.NewClient(&redis.Options{
		Addr:     "192.168.10.208:6379",
		Password: "",
		DB:       0,
	})

	// 通过 cient.Ping() 来检查是否成功连接到了 redis 服务器
	pong, err := client.Ping().Result()
	fmt.Println(pong, err)

	return client
}
